const path = require('path');

module.exports = {
  devServer: {
    proxy: {
      '/api': {
        target: 'http://221.213.128.102:5000',
        ws: false,
        // 跨域
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/'    //代理的路径
        },
        // headers: {
        //   'accept': 'application/json',
        //   'content-type': 'application/json;charset=UTF-8',
        // },
      }
    },
  },
  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'scss',
      patterns: [
        path.resolve(__dirname, './src/style/_params.scss'),
      ]
    }
  }
};
